package com.lcd.ssm.util;

import javax.servlet.http.HttpServletRequest;

/**
 * lcd  2020/4/27
 * Description:
 */
public class UserContext {
    public static final String USER_SESSION = "USER_SESSION";
    public static final String PERMISSIONS_SESSION = "PERMISSIONS_SESSION";
    public static final String MENU_SESSION = "MENU_SESSION";
    private static ThreadLocal<HttpServletRequest> threadRequest=new ThreadLocal<>();

    public static void setRequest(HttpServletRequest request) {
        threadRequest.set(request);
    }

    public static HttpServletRequest getRequest(){
        return threadRequest.get();
    }
}
